/*
 * bplvisual.so
 *
 * TDialog.h
 */


#ifndef __TDialog_H__
#define __TDialog_H__


#define __BplVisual_H_Inside__

#include <Classes.hpp>
#include <Types.hpp>
#include <TControl.h>


namespace QDialogs {


class PACKAGE TDialog : public Classes::TComponent
{
    typedef Classes::TComponent inherited;
    friend class TCustomDialog;
    friend class TOpenDialog;
    
public:
    __fastcall TDialog (Classes::TComponent * AOwner);
    
    virtual bool __fastcall Execute ();
    
protected:
    __property int Height = {read = GetHeight, write = SetHeight, nodefault};
    
    __property bool Modal = {read = FModal, write = FModal, default = 1};
    
    __property Types::TPoint Position = {read = GetPosition, write = SetPosition};
    
    __property WideString Title = {read = FTitle, write = SetTitle};
    
    __property int Width = {read = GetWidth, write = SetWidth, nodefault};
    
    DYNAMIC void __fastcall DoClose ();
    
    virtual bool __fastcall DoExecute () = 0;
    
    DYNAMIC void __fastcall DoShow ();
    
    virtual Types::TRect __fastcall GetBounds () = 0;
    
    virtual void __fastcall SetBounds (int ALeft, int ATop, int AWidth, int AHeight) = 0;
    
    virtual void __fastcall SetTitle (const WideString Value);
    
    __property Classes::TNotifyEvent OnClose = {read = FOnClose, write = FOnClose};
    
    __property Classes::TNotifyEvent OnShow = {read = FOnShow, write = FOnShow};
    
private:
    int FHeight;
    bool FModal;
    Types::TPoint FPosition;
    TScalingFlags FScaleFlags;
    WideString FTitle;
    int FWidth;
    Classes::TNotifyEvent FOnClose;
    Classes::TNotifyEvent FOnShow;
    
    int __fastcall GetHeight ();
    
    Types::TPoint __fastcall GetPosition ();
    
    int __fastcall GetWidth ();
    
    void __fastcall SetHeight (const int Value);
    
    void __fastcall SetPosition (const Types::TPoint & Value);
    
    void __fastcall SetWidth (const int Value);
};


}; // QDialogs


#undef __BplVisual_H_Inside__

#endif /* __TDialog_H__ */
